fix(examples): remove broken require.main guards and their importer examples - #168
Merged
Merged
Conversation
ling-senpeng13
marked this pull request as ready for review
August 17, 2026 23:35
ling-senpeng13
marked this pull request as draft
August 18, 2026 00:25
Contributor
|
I have investigated Delete followings
For others
|
Contributor
Author
|
Done in b4231bc — deleted |
ling-senpeng13
marked this pull request as ready for review
August 18, 2026 21:58
…xamples 63-deploy.ts and 63d-serve-from-package.ts guarded main() with 'require.main === module', which throws ReferenceError in ES module scope — crashing them on direct execution and, transitively, the examples importing agents from them. Delete 63c-run-by-name.ts and 63e-run-monitoring.ts (the only importers that made a main() guard necessary), invoke main() directly like every other example, and update the README references.
ling-senpeng13
force-pushed
the
fix/esm-main-guard-examples
branch
from
August 18, 2026 22:21
eb9d75e to
b4231bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
63-deploy.tsand63d-serve-from-package.tsguardedmain()withif (require.main === module), which throwsReferenceError: require is not definedin ES module scope — crashing them on direct execution and, transitively,63c-run-by-name.ts/63e-run-monitoring.tswhich import agents from them.Per review, rather than porting the guard to its ESM equivalent:
63c-run-by-name.tsand63e-run-monitoring.ts— the only importers that made amain()guard necessary63-deploy.tsand63d-serve-from-package.ts;main()is now invoked directly like every other exampleVerified: both remaining examples run to
COMPLETEDagainst conductor-oss 3.32.0-rc18; no stale references to the deleted files remain.